package priv.mill.logdemo;

import java.io.IOException;
import java.io.PrintWriter;
import java.math.BigDecimal;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;

import com.alibaba.fastjson.JSON;

import priv.mill.model.Employee;
import priv.mill.util.JdbcUtil;


public class Hehe extends HttpServlet{

	private static Logger logger = Logger.getLogger(Hehe.class);

	@Override
	protected void doGet(HttpServletRequest req, 
			HttpServletResponse resp) throws ServletException, IOException {
		PrintWriter writer = resp.getWriter();
		Object object;
		try {

			object = JdbcUtil.query("select * from employee");
			writer.println(JSON.toJSONString(object));
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	
	
}


